Optimal. Leaf size=154 \[ \frac {(e+f x)^{1+m}}{a f (1+m)}+\frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right )}{2 a d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.11, antiderivative size = 154, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 4, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {4619, 32, 3389,
2212} \begin {gather*} \frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \text {Gamma}\left (m+1,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \text {Gamma}\left (m+1,\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {(e+f x)^{m+1}}{a f (m+1)} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 32
Rule 2212
Rule 3389
Rule 4619
Rubi steps
\begin {align*} \int \frac {(e+f x)^m \cos ^2(c+d x)}{a+a \sin (c+d x)} \, dx &=\frac {\int (e+f x)^m \, dx}{a}-\frac {\int (e+f x)^m \sin (c+d x) \, dx}{a}\\ &=\frac {(e+f x)^{1+m}}{a f (1+m)}-\frac {i \int e^{-i (c+d x)} (e+f x)^m \, dx}{2 a}+\frac {i \int e^{i (c+d x)} (e+f x)^m \, dx}{2 a}\\ &=\frac {(e+f x)^{1+m}}{a f (1+m)}+\frac {e^{i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right )}{2 a d}+\frac {e^{-i \left (c-\frac {d e}{f}\right )} (e+f x)^m \left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right )}{2 a d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 1.90, size = 187, normalized size = 1.21 \begin {gather*} \frac {(e+f x)^m \left (\frac {2 d (e+f x)}{f (1+m)}+\left (\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,\frac {i d (e+f x)}{f}\right ) \left (\cos \left (c-\frac {d e}{f}\right )-i \sin \left (c-\frac {d e}{f}\right )\right )+\left (-\frac {i d (e+f x)}{f}\right )^{-m} \Gamma \left (1+m,-\frac {i d (e+f x)}{f}\right ) \left (\cos \left (c-\frac {d e}{f}\right )+i \sin \left (c-\frac {d e}{f}\right )\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )^2}{2 a d (1+\sin (c+d x))} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.07, size = 0, normalized size = 0.00 \[\int \frac {\left (f x +e \right )^{m} \left (\cos ^{2}\left (d x +c \right )\right )}{a +a \sin \left (d x +c \right )}\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.11, size = 136, normalized size = 0.88 \begin {gather*} \frac {{\left (f m + f\right )} e^{\left (-\frac {f m \log \left (\frac {i \, d}{f}\right ) + i \, c f - i \, d e}{f}\right )} \Gamma \left (m + 1, \frac {i \, d f x + i \, d e}{f}\right ) + {\left (f m + f\right )} e^{\left (-\frac {f m \log \left (-\frac {i \, d}{f}\right ) - i \, c f + i \, d e}{f}\right )} \Gamma \left (m + 1, \frac {-i \, d f x - i \, d e}{f}\right ) + 2 \, {\left (d f x + d e\right )} {\left (f x + e\right )}^{m}}{2 \, {\left (a d f m + a d f\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \frac {\int \frac {\left (e + f x\right )^{m} \cos ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {{\cos \left (c+d\,x\right )}^2\,{\left (e+f\,x\right )}^m}{a+a\,\sin \left (c+d\,x\right )} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________